***load data

use "${path}\data\states\statevars_ready.dta", clear 

***Online Appendix Tables

cd "${path}\output\tables"

***Table A.XVII

eststo: reg unemp_rate evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg share_seats_house evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg share_seats_senate evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg lnloweduexp_pc evo_score i.state i.year, vce(cluster state)
estadd ysumm

esttab using econpoleduc.tex, replace keep(evo_score) b(3) se(3) fragment  nonotes  label /// 
   stats(ymean ysd  r2_a N, labels ("Mean of Dep. Var." "Std. Dev. of Dep. Var." "Adj. R-squared" "Observations") fmt(2 2 3 %9.0fc))  /// 
mlabels("\specialcell{Unemployment \\ Rate}" "\specialcell{Share of \\ Democrat Seats \\ (State House)}" "\specialcell{Share of \\ Democrat Seats \\ (State Senate)}" "\specialcell{School \\ Expenditure}") star(* 0.1 ** 0.05 *** 0.01) /// 
indicate("State FEs = *state" "Year FEs = *year", labels("YES" "NO"))
eststo clear

***Table A.XXXV   

eststo: reg lnenroll_private evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

eststo: reg lngraduate_private evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

eststo: reg lnteachers_private evo_score i.state i.year, vce(cluster state)
estadd ysumm

eststo: reg lnschool_private evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

eststo: reg lnhomeschool_enroll evo_score i.state i.year, vce(cluster state) baselevels
estadd ysumm

esttab using private_var.tex, replace keep(evo_score) b(3) se(3) fragment  nonotes  label /// 
   stats(ymean ysd  r2_a N, labels ("Mean of Dep. Var." "Std. Dev. of Dep. Var." "Adj. R-squared" "Observations") fmt(2 2 3 %9.0fc))  /// 
   mgroups("Private Schools:" "Homeschooling:", pattern(1  0 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// 
mlabels("\specialcell{Students}" "\specialcell{Graduates}" "\specialcell{Teachers}" "\specialcell{Schools}" "Students") star(* 0.1 ** 0.05 *** 0.01) /// 
indicate("State FEs = *state" "Year FEs = *year", labels("YES" "NO"))
eststo clear
